package com.java.gamePackeg.event;

import com.java.gamePackeg.Player;
import com.java.gamePackeg.Product;

import javax.swing.*;
import java.util.List;

public class ThiefEvent implements Event {
    private static final float RATE = 0.5f;

    @Override
    public void event(Player player, List<Product> marketProList) {
        JOptionPane.showMessageDialog(null, "在人群拥挤的地方路过，被别人顺的一半的现金");
        player.setMoney(Math.round(player.getMoney() * (1 - RATE)));
    }
}
